#ifndef WAVELEGEND_H
#define WAVELEGEND_H

#include <QWidget>
#include "wavetool.h"


class CPointLegend : public CLegend
{
public:
    static CPointLegend& getInstance() {
        /*c++11支持，线程安全的单例模式*/
        static CPointLegend instance;
        return instance;
    }
public:
    CPointLegend();
    virtual ~CPointLegend();
};

class CLineLegend : public CLegend
{
public:
    static CLineLegend& getInstance() {
        //c++11支持，线程安全的单例模式
        static CLineLegend instance;
        return instance;
    }
public:
    CLineLegend();
    virtual ~CLineLegend();
};

class WavePointLegend : public QWidget
{
    Q_OBJECT
public:
    explicit WavePointLegend(QWidget *parent = nullptr);
public:
    virtual void paintEvent(QPaintEvent *event);
private:
    CPointLegend* pl;
signals:
};


class WaveLineLegend : public QWidget
{
    Q_OBJECT
public:
    explicit WaveLineLegend(QWidget *parent = nullptr);
public:
    virtual void paintEvent(QPaintEvent *event);
private:
    CLineLegend* ll;
signals:
};


#endif // WAVELEGEND_H
